package lab01;

public class test11 {
    public static void main(String[] args) {
        System.out.println("打印1到100的所有素数.");
        int t = 0;

        for (int i = 2; i <= 100; i++) {
            if ((i % 2 != 0 && i % 3 != 0 && i % 5 != 0 && i % 7 != 0) | i == 2 | i == 3 | i == 5 | i == 7) {
                System.out.print(i);
                System.out.print('\t');
                t++;
                if (t % 5 == 0) {
                    System.out.println('\n');
                }
            }
        }
    }
}
